from PLA import PLA_single
from perceptron_network import three_layer_demo

if __name__ == "__main__":


    print(
    '''
    作业二 题1.
    '''
    )

    v1 = [4,3,6]
    v2 = [2,-2,3]
    v3 = [1,0,-3] 
    v4 = [4,2,3]

    N = [v1,v4]
    P = [v2,v3]
    order = [v1, v2, v3 ,v4]



    w = PLA_single(N,P,[1,0,0,0],order=order)
    
    print("最终的感知器准则函数权值向量为: ",w,end="\n\n")


    print(
    '''
    作业二 题3.
    '''
    )


    x1 = [-1,1,1,-1]
    x2 = [1,1,-1,-1]
    x3 = [-1,1,-1,1]

    print("x1的判别结果是: ",three_layer_demo(x1)) 
    print("x2的判别结果是: ",three_layer_demo(x2)) 
    print("x3的判别结果是: ",three_layer_demo(x3)) 
